# MIT License
# 
# Copyright (c) 2024 Jianbo ZHU
# 
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# 
# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.
# 
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.


import os as _system


PKGNAME = "phonokit"
VERSION = "0.0.1"
_BRANCH = _system.getenv("PHONOKIT_TESTING_BRANCH", "2")    # for testing

PHONOKIT_PHONO2 = "phonopy"
PHONOKIT_PHONO3 = "phono3py"
PHONOKIT_DISPYAML = _system.getenv("PHONOKIT_DISPYAML", "phonopy_disp.yaml")
PHONOKIT_TMPFILE = _system.getenv("PHONOKIT_TMPFILE", "phonokit.xtmp")
PHONOKIT_DIMMAT = _system.getenv("PHONOKIT_DIMMAT", "DIMMAT")
PHONOKIT_CALDIR = _system.getenv("PHONOKIT_CALDIR", "calc")
PHONOKIT_FORCE = _system.getenv("PHONOKIT_FORCE", "force")

PHONOKIT_VASPKIT_EXEC = _system.getenv("PHONOKIT_VASPKIT_EXEC", "vaspkit")
PHONOKIT_VASPKIT_PHBD = _system.getenv("PHONOKIT_VASPKIT_PHBD", "KPATH.phonopy")

PHONOKIT_VASP_NCORE = _system.getenv("PHONOKIT_VASP_NCORE", "1")
PHONOKIT_INCAR_SCF = """# SCF calculation
   PREC = Accurate
   ALGO = Normal
 IBRION = -1
  ENCUT = 500
  EDIFF = 1.0e-08
 ISMEAR = 0; SIGMA = 0.01
ADDGRID = .TRUE.
  LREAL = .FALSE.
  LWAVE = .FALSE.
 LCHARG = .FALSE.
  NCORE = {}
"""
PHONOKIT_INCAR_DFPT = """# DFPT calculation
   PREC = Accurate
   ALGO = Normal
 IBRION = 8
  ENCUT = 500
  EDIFF = 1.0e-08
 ISMEAR = 0; SIGMA = 0.01
ADDGRID = .TRUE.
  LREAL = .FALSE.
  LWAVE = .FALSE.
 LCHARG = .FALSE.
"""

PHONOKIT_INCAR_BORN = """# BORN calculation
    PREC = Accurate
    ALGO = Normal
  IBRION = -1
   ENCUT = 500
   EDIFF = 1.0e-08
  ISMEAR = 0; SIGMA = 0.01
   LREAL = .FALSE.
   LWAVE = .FALSE.
  LCHARG = .FALSE.
LEPSILON = .TRUE.
"""
